//
// Abstract.cpp for  in /home/jousse_f//workspace/C++/abstractVM
// 
// Made by florian jousseau
// Login   <jousse_f@epitech.net>
// 
// Started on  Mon Feb 13 11:34:22 2012 florian jousseau
// Last update Thu Feb 16 18:11:29 2012 florian jousseau
//

#include "Abstract.hh"

VM::VM()
{
  this->P = NULL;
}

VM::~VM()
{
  if (this->P)
    delete P;
}

std::list<IOperand *>	VM::getStack() const
{
  return (this->stack);
}

VM			&VM::operator=(const VM &other)
{
  if (this != &other)
    {
      if (this->P)
	delete P;
      this->P = new Parser(*other.P);
    }
  return *this;
}

void			VM::setParser(Parser *p)
{
  if (this->P)
    delete this->P;
  this->P = new Parser(*p);
}

Parser			*VM::getParser() const
{
  return this->P;
}

